# -*- coding: utf-8 -*-
# Created by 'Zhou Bingbing'  on 2019/8/24


import numpy

x= numpy.load('../util/all_vocb_cut_1.npz')['dict'][()]
y= numpy.load('../util/all_vocb_cut_2.npz')['dict'][()]
j= numpy.load('../util/all_vocb_cut_3.npz')['dict'][()]
k= numpy.load('../util/all_vocb_cut_4.npz')['dict'][()]
from flask import Flask,request
app=Flask(__name__)
def get_count(text):
    try:
        res1 = x[text]
    except:
        res1 = 0
    try:
        res2 = y[text]
    except:
        res2 = 0
    try:
        res3 = j[text]
    except:
        res3 = 0
    try:
        res4 = k[text]
    except:
        res4 = 0
    res = res1 + res2 + res4+res3
    return res